﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using EShop.Core.Model.Store;
using EShop.Core;

namespace EShop.Services.Store
{
    public interface IProductService
    {
        /// <summary>
        /// 查询商品，单个
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Product GetProductById(string id);
        /// <summary>
        /// 查询商品分页
        /// </summary>
        /// <param name="strartid"></param>
        /// <param name="endid"></param>
        /// <param name="fiter"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        // DataTable GetProductList(string strartid, string endid, string fiter, string pagesize);
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool AddProduct(Product model);
        /// <summary>
        /// 修改商品
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool UpdateProduct(Product model);
        /// <summary>
        /// 删除商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelProduct(string id);
        /// <summary>
        /// 取得一条商品信息jsons
        /// </summary>
        /// <param name="id"></param>
        /// <param name="isjson"></param>
        /// <returns></returns>
        string GetProductByid(string id, bool isjson);
       /// <summary>
        /// 取得商品列表
       /// </summary>
       /// <param name="pageIndex"></param>
       /// <param name="pageSize"></param>
       /// <param name="orderState"></param>
       /// <returns></returns>
        PagedList<ProductList> GetAllProduct(int pageIndex, int pageSize, string sortDirection, string sortField, int? selectSearch, string searchStr);

     

    }
}
